Fix typescript-ts-mode indentation (bug#77803)
authorKonstantin Kharlamov <Hi-Angel@yandex.ru>
Tue, 15 Apr 2025 14:34:11 +0000 (17:34 +0300)
committerYuan Fu <casouri@gmail.com>
Fri, 18 Apr 2025 23:40:06 +0000 (16:40 -0700)
commit9750333dde9d23510341632d1c9a950d9c67415c
treebe12fd26c3bfabfda2047bd197b27993619539a7
parentef8bfe90b7201f9f42484219267cec9d79d5b938
Fix typescript-ts-mode indentation (bug#77803)

Don't align variable names to their declaratory expression.

Before this commit in code like:

    const a = 1,
          b = 2;

the b would get indented to `const'.  Similarly for `var' and
`let'. The expected behavior instead is getting indented to
`typescript-ts-mode-indent-offset'.

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--indent-rules): Indent identifiers declarations to
`typescript-ts-mode-indent-offset'.
* test/lisp/progmodes/typescript-ts-mode-resources/indent.erts
(Lexical and variable declarations): Update test accordingly.
lisp/progmodes/typescript-ts-mode.el
test/lisp/progmodes/typescript-ts-mode-resources/indent.erts